<?
	$id = fgsBase::getParam(0);
	$PIS = fgsMatchs::get($id);
	$GI = $PIS[0];
?>
<h2 class="icon">
<?
	$game = fgsGames::get($GI['GameID']);
	if (!empty($game['logo_data'])) 
		printf('<img src="%s"/>', fgsBase::link('game', array($game['gid'], 'logo')));
	printf(tr('Match #%d'), $id);
	echo ' - ';
	echo fgsBase::linkPage($game['name'], 'game', array($game['gid']));
	if (!empty($game['url']))
		printf('<span class="info"><a href="%s">%s</a></span>', $game['url'], $game['url']);
?>
</h2>
<p class="backpage"><?=fgsBase::linkPage(tr('&laquo; Back to matchs list'), 'matchs', array($id))?></p>
<script type="text/javascript" src="<?=fgsBase::getBaseUrl()?>js/ths.js">
</script>
<div class="match">
<?
	// search a template
	$gamename = $GI['GameID'];
	$filename = sprintf('scripts/pages/templates/matchs/%s.php', strtolower($gamename));
	if (file_exists($filename)) 
		include $filename;
	else
		include 'scripts/pages/templates/matchs/default.php';
?>
</div>
